#import "MO2XMLCoreDataAccess.h"


@implementation MO2XMLCoreDataAccess

- (id)init {
	self = [super init];
	if (self != nil) {
		[self setManagedObjectContext:nil];
	}
	return self;
}


- (void)dealloc {
	[managedObjectContext release];
	
	[super dealloc];
}

- (NSManagedObjectContext *)managedObjectContext {
	if(managedObjectContext == nil) {
		return [[NSApp delegate] managedObjectContext];
	}
	return managedObjectContext;
}

- (void)setManagedObjectContext:(NSManagedObjectContext *)value {
	[value retain];
	[managedObjectContext release];
	managedObjectContext = value;
}

@end
